Optimal. Leaf size=82 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{8 a^3 d}-\frac {1}{6 d (a+a \cos (c+d x))^3}+\frac {5}{8 a d (a+a \cos (c+d x))^2}-\frac {7}{8 d \left (a^3+a^3 \cos (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3957, 2915, 12,
90, 212} \begin {gather*} -\frac {7}{8 d \left (a^3 \cos (c+d x)+a^3\right )}-\frac {\tanh ^{-1}(\cos (c+d x))}{8 a^3 d}+\frac {5}{8 a d (a \cos (c+d x)+a)^2}-\frac {1}{6 d (a \cos (c+d x)+a)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 90
Rule 212
Rule 2915
Rule 3957
Rubi steps
\begin {align*} \int \frac {\csc (c+d x)}{(a+a \sec (c+d x))^3} \, dx &=-\int \frac {\cos ^2(c+d x) \cot (c+d x)}{(-a-a \cos (c+d x))^3} \, dx\\ &=\frac {a \text {Subst}\left (\int \frac {x^3}{a^3 (-a-x) (-a+x)^4} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {x^3}{(-a-x) (-a+x)^4} \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {a^2}{2 (a-x)^4}+\frac {5 a}{4 (a-x)^3}-\frac {7}{8 (a-x)^2}+\frac {1}{8 \left (a^2-x^2\right )}\right ) \, dx,x,-a \cos (c+d x)\right )}{a^2 d}\\ &=-\frac {1}{6 d (a+a \cos (c+d x))^3}+\frac {5}{8 a d (a+a \cos (c+d x))^2}-\frac {7}{8 d \left (a^3+a^3 \cos (c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,-a \cos (c+d x)\right )}{8 a^2 d}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{8 a^3 d}-\frac {1}{6 d (a+a \cos (c+d x))^3}+\frac {5}{8 a d (a+a \cos (c+d x))^2}-\frac {7}{8 d \left (a^3+a^3 \cos (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 97, normalized size = 1.18 \begin {gather*} -\frac {\left (2-15 \cos ^2\left (\frac {1}{2} (c+d x)\right )+42 \cos ^4\left (\frac {1}{2} (c+d x)\right )+12 \cos ^6\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right ) \sec ^3(c+d x)}{12 a^3 d (1+\sec (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 67, normalized size = 0.82
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (-1+\cos \left (d x +c \right )\right )}{16}-\frac {1}{6 \left (1+\cos \left (d x +c \right )\right )^{3}}+\frac {5}{8 \left (1+\cos \left (d x +c \right )\right )^{2}}-\frac {7}{8 \left (1+\cos \left (d x +c \right )\right )}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{16}}{d \,a^{3}}\) | \(67\) |
default | \(\frac {\frac {\ln \left (-1+\cos \left (d x +c \right )\right )}{16}-\frac {1}{6 \left (1+\cos \left (d x +c \right )\right )^{3}}+\frac {5}{8 \left (1+\cos \left (d x +c \right )\right )^{2}}-\frac {7}{8 \left (1+\cos \left (d x +c \right )\right )}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{16}}{d \,a^{3}}\) | \(67\) |
norman | \(\frac {-\frac {3 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 a d}+\frac {3 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 a d}-\frac {\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )}{48 a d}}{a^{2}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a^{3} d}\) | \(82\) |
risch | \(-\frac {21 \,{\mathrm e}^{5 i \left (d x +c \right )}+54 \,{\mathrm e}^{4 i \left (d x +c \right )}+82 \,{\mathrm e}^{3 i \left (d x +c \right )}+54 \,{\mathrm e}^{2 i \left (d x +c \right )}+21 \,{\mathrm e}^{i \left (d x +c \right )}}{12 a^{3} d \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{6}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{8 a^{3} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{8 a^{3} d}\) | \(119\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 98, normalized size = 1.20 \begin {gather*} -\frac {\frac {2 \, {\left (21 \, \cos \left (d x + c\right )^{2} + 27 \, \cos \left (d x + c\right ) + 10\right )}}{a^{3} \cos \left (d x + c\right )^{3} + 3 \, a^{3} \cos \left (d x + c\right )^{2} + 3 \, a^{3} \cos \left (d x + c\right ) + a^{3}} + \frac {3 \, \log \left (\cos \left (d x + c\right ) + 1\right )}{a^{3}} - \frac {3 \, \log \left (\cos \left (d x + c\right ) - 1\right )}{a^{3}}}{48 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 151 vs.
\(2 (74) = 148\).
time = 2.77, size = 151, normalized size = 1.84 \begin {gather*} -\frac {42 \, \cos \left (d x + c\right )^{2} + 3 \, {\left (\cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )^{2} + 3 \, \cos \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (\cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )^{2} + 3 \, \cos \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 54 \, \cos \left (d x + c\right ) + 20}{48 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc {\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 113, normalized size = 1.38 \begin {gather*} \frac {\frac {6 \, \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{3}} + \frac {\frac {18 \, a^{6} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {9 \, a^{6} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {2 \, a^{6} {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{9}}}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 83, normalized size = 1.01 \begin {gather*} -\frac {\frac {7\,{\cos \left (c+d\,x\right )}^2}{8}+\frac {9\,\cos \left (c+d\,x\right )}{8}+\frac {5}{12}}{d\,\left (a^3\,{\cos \left (c+d\,x\right )}^3+3\,a^3\,{\cos \left (c+d\,x\right )}^2+3\,a^3\,\cos \left (c+d\,x\right )+a^3\right )}-\frac {\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{8\,a^3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________